package com.example.demo.demos.web.controller;

import com.example.demo.demos.web.entity.Usertest;
import com.example.demo.demos.web.mapper.UserMapper;
import com.example.demo.demos.web.mapper.UsertestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("index1")
public class UsertestController {
    @Autowired
    private UsertestMapper usertestMapper;
@PostMapping("/add")
  public Map<String , Object> add(@RequestBody Usertest usertest) {
    Map<String, Object> res = new HashMap<>();
    Integer issuccess = usertestMapper.add(usertest);
    res.put("data", issuccess);

    return res;
}
}
